﻿using System;
using System.IO;
using System.Web.UI;

namespace SouthernLand.Controls
{
    public partial class WebURL : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected string Load_WebLink()
        {
            string filePath = Request.PhysicalApplicationPath + "UserUpload/WebURL.txt";
            String text = "";
            using (StreamReader sr = File.OpenText(filePath))
            {
                text = text +
                       "<select class='Textbox' name='weblink' size='1' onchange='changeLink();' style='width:160px;'>";
                String input;
                while ((input = sr.ReadLine()) != null)
                {
                    text = text + "<option value=" + input + ">" + input + "</option>";
                }
                text = text + "</select>";
                sr.Close();
            }
            return text;
        }
    }
}